﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Gallery.aspx.cs" Inherits="RedHouse.AdminControl.Gallery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:PlaceHolder ID="MainPlaceHolder" runat="server">
        <asp:Panel ID="ErrorPanel" runat="server">
            <div class="err">
                <div class="err_icon">
                    <!-- -->
                </div>
                <a href="#" class="close" title="Close this notification">x</a>
                <div class="desc">
                    <span>Error!</span>
                    <p>
                        <%=this.Message %></p>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="SuccessPanel" runat="server">
            <div class="succes">
                <div class="succes_icon">
                    <!-- -->
                </div>
                <a href="#" class="close" title="Close this notification">x</a>
                <div class="desc">
                    <span>Success!</span>
                    <p>
                        <%=this.Message %></p>
                </div>
            </div>
        </asp:Panel>
        <div class="clear">
            <!-- -->
        </div>
        <div>
            <h1>
                <%=GalleryOwner != null? GalleryOwner.Title:string.Empty%></h1>
        </div>
        <div style="width: 300px">
            <h4>
                Category:
                <%=Category %></h4>
        </div>
        <div class="input_field">
            <label for="lf">
                Image Url:
            </label>
            <asp:TextBox CssClass="bigfield" ID="txtUrl" runat="server" />
            <asp:Button Text="Add" runat="server" ID="btnAdd" />
            <%-- <span class="validate_success">A positive message!</span>--%>
        </div>
        <%if (ImageList != null)
          {
        %>
        <table>
            <%
              foreach (RedHouse.Data.Image item in ImageList)
              {
                  if (ImageList.IndexOf(item) % 4 == 0)
                  {
            %>
            <tr>
                <%} %>
                <td>
                    <a href="#" title="Delete">
                        <img src="../assets/action_delete.png" alt="Delete" /></a>
                    <img src="<%=item.Url %>" alt="no image" width="200" height="200" />
                </td>
                <%
                  if (ImageList.IndexOf(item) % 4 == 3)
                  {
                %>
            </tr>
            <%}
              } %>
        </table>
        <%
          }%>
    </asp:PlaceHolder>
</asp:Content>
